<template>
	<view class="box">
		<scroll-view scroll-y="true" @scrolltolower="lower" style="height: 1250rpx;">
			<view class="hp">
				96%好评
			</view>
			<view class="hr"></view>
			<view class="lablebox">
				<view :class="current==index?'selectlable':'lable'" v-for="(item,index) in navlist" :key="index"
					@click="nav(index)">
					{{item.name}}{{item.num}}
				</view>
			</view>
			<view class="ramekbox" v-for="(item,index) in 5">
				<view class="ifobox">
					<view class="leftbox">
						<image src="../../static/logo.png" mode="" class="header"></image>
						<text class="name">张</text>
						<image src="../../static/形状8.png" mode="widthFix" class="hg"></image>
					</view>
					<view class="rightbox">
						<text class="time">2021-01-02</text>
						<view class="zanbox">
							<image src="../../static/点赞.png" mode="" class="zan"></image>
							<text>5</text>
						</view>
					</view>
				</view>
				<view class="contant">
					真的很划算，秉承着出门玩少操心的原因给自己和妈妈定了跟团游
				</view>
				<view class="imgbox">
					<image src="../../static/logo.png" mode="" v-for="(item,index) in 5" @click="lookimg(index)">
					</image>
				</view>
			</view>
		</scroll-view>
	</view>
</template>

<script>
	export default {
		data() {
			return {
				navlist: [{
					name: "全部",
					num: "100"
				}, {
					name: "最新",
					num: "100"
				}, {
					name: "满意",
					num: "100"
				}, {
					name: "一般",
					num: "100"
				}, {
					name: "有图",
					num: "100"
				}, {
					name: "性价比高",
					num: "100"
				}],
				current: 0
			}
		},
		methods: {
			nav(v) {
				this.current = v
			},
			lookimg() {
				uni.previewImage({
					urls: "", //地址

				})
			},
			lower(){
				uni.showToast({
					title:'触底了'
				})
			}
		},
		onLoad() {
			setTimeout(function() {
			}, 1000);
			uni.startPullDownRefresh();
		},
		onPullDownRefresh() {
			setTimeout(function() {
				uni.stopPullDownRefresh();
			}, 1000);
		}
	}
</script>

<style lang="scss" scoped>
	.box {
		position: fixed;
		top: 0;
		left: 0;
		right: 0;
		bottom: 0;
		background-color: #FFFFFF;
		padding-top: 100rpx;
		box-sizing: border-box;
		overflow-y: scroll;

		.hp {
			font-family: SourceHanSansCN-Bold;
			font-size: 30rpx;
			color: #333333;
			font-weight: 700;
			margin-left: 38rpx;
		}

		.hr {
			width: 100%;
			height: 1rpx;
			background-color: #ececec;
			margin-top: 16rpx;
		}

		.lablebox {
			display: flex;
			align-items: center;
			margin-left: 30rpx;
			flex-wrap: wrap;
			margin-top: 28rpx;

			.lable {
				padding: 0 20rpx;
				box-sizing: border-box;
				height: 50rpx;
				background-color: #fff3ef;
				line-height: 50rpx;
				text-align: center;
				font-family: SourceHanSansCN-Regular;
				font-size: 24rpx;
				color: #666666;
				border-radius: 50rpx;
				margin-bottom: 17rpx;
				margin-right: 17rpx;
			}

			.selectlable {
				padding: 0 20rpx;
				box-sizing: border-box;
				height: 50rpx;
				background-color: #fff3ef;
				line-height: 50rpx;
				text-align: center;
				font-family: SourceHanSansCN-Regular;
				font-size: 24rpx;
				color: #f73f33;
				border-radius: 50rpx;
				margin-bottom: 17rpx;
				margin-right: 17rpx;
				border: solid 2rpx #f73f33;
			}
		}

		.ramekbox {
			padding: 19rpx 45rpx 30rpx 30rpx;
			box-sizing: border-box;

			.ifobox {
				display: flex;
				align-items: center;
				justify-content: space-between;

				.leftbox {
					display: flex;
					align-items: center;

					.header {
						width: 50rpx;
						height: 50rpx;
						border-radius: 50rpx;

					}

					.name {
						font-family: SourceHanSansCN-Regular;
						font-size: 22rpx;
						margin-left: 23rpx;
						color: #464646;
					}

					.hg {
						width: 30rpx;
						// height: 19rpx;
						margin-left: 23rpx;
					}
				}

				.rightbox {
					display: flex;
					align-items: center;

					.time {
						font-family: SourceHanSansCN-Regular;
						font-size: 22rpx;
						color: #b8b8b8;

					}

					.zanbox {
						margin-left: 24rpx;
						display: flex;
						align-items: center;


						.zan {
							width: 26rpx;
							height: 28rpx;
						}

						text {
							font-family: SourceHanSansCN-Regular;
							font-size: 22rpx;
							color: #b8b8b8;
							margin-left: 5rpx;
						}
					}
				}
			}

			.contant {
				margin-top: 22rpx;
				font-family: SourceHanSansCN-Regular;
				font-size: 22rpx;
				line-height: 32rpx;
				color: #464646;
			}

			.imgbox {
				display: flex;
				align-items: center;
				flex-wrap: wrap;

				image {
					width: 219rpx;
					height: 219rpx;
					margin-right: 10rpx;
					margin-top: 10rpx;
				}

				image:nth-child(3n) {
					margin-right: 0;
				}
			}
		}
	}
</style>
